<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="../resources/css/bootstrap.min.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="../resources/css/index.css">
	<link rel="stylesheet" type="text/css" href="../resources/css/rightmain.css">
	
    <link rel="stylesheet" type="text/css" href="../resources/css/normalize.css" />
  <link rel="stylesheet" type="text/css" href="../resources/css/demo.css">
  <link rel="stylesheet" type="text/css" href="../resources/css/sheets-of-paper-a4.css">
	<title>图书</title>
</head>
<body style="background: url(../resources/img/2.jpg)">

	<div class="head">
		<div class="headlogo pull-left">
			<h1><a href="javascript:;">图书管理</a></h1>
		</div> 
		<ul class="headnav pull-left">
			<li class="menu_0 current_menu">
				<a href="javascript:;">图书列表</a>
			</li>
			
			
		</ul>
		<ul class="headlink pull-right">
			<li class="link_0"><a href="javascript:;">您好，cyt</a></li>
			<li class="link_1"><a href="javascript:;"><span class="ton">隐藏菜单</span></a></li>
			<li class="link_4"><a href="login">退出</a></li>
		</ul>
	</div>
	<!-- 头部页面结束 -->
	<div class="leftmenu">
		<div class="leftmenu_0">
			<dl>
				<dt>图书管理</dt>
				<dd>
					<ul class="clearfix">
						
						<li><a href="book/add">图书编写</a></li>
					</ul>
				</dd>
			</dl>
		</div>
		
		
		
	</div>
	<!-- 左边导航结束 -->
	<div class="rightmain" id="rightmain">
		<div class="rightcontent">
		<div class="iframecontent">
        <div class="pos">
         <i class="icoh"></i>
          <span>我的图书</span><span class="line">|</span><span>写图书内容&nbsp;></span>
        </div>
          <form method="post" accept-charset="utf-8">
        <div class="container intro">
            <div class="row fill"></div>
            <div class="row">
              <div class="col-sm-12">
              <div>
              <input style="float: left; width:300px; margin-left:180px;" type="text" id="contact_subject"
               name="title" value="${book.title }" class="form-control" placeholder="请输入标题"  required/>
              <input style="float: right; width:300px; margin-left:180px;" type="text" id="contact_subject" 
              name="author" value="${book.author }" class="form-control" placeholder="所属类型"  required/>
              </div>
             <div style="  margin-top: 60px; margin-left: 180px;"><textarea  rows="15" cols="100"
              name="brief" placeholder="请输入图书内容" required>${book.brief }</textarea></div>
             <!-- <div class="page" contenteditable="true" > 
             </div>-->
           </div>
            </div>
              <input type="submit"  value="提交" class="btn  btn-success" style="float: right; 
              margin-top: 30px; margin-right: 25px;">
      </div>
      </form>
  </div>
		</div>
	</div>

	 <script src="../resources/js/jquery-3.1.1.js"></script>
      <script src="../resources/js/bootstrap.min.js"></script>
	  <script src="../resources/js/banner.js"></script>
	  <script type="text/javascript">
	    //导航经过改变宽度和颜色
		$(".headnav li").click(function(){
			var index = $(this).index();
			//alert(index);
			$(this).addClass("current_menu").siblings().removeClass('current_menu');
			//头部导航和左边导航对应
			$(".leftmenu").find(".leftmenu_0").eq(index).removeClass("hidden").siblings().addClass('hidden');

		});
		//头部导航和左边导航对应
		// bannerplay($(".leftmenu"),$(".leftmenu_0"),$(".headnav li"),4,false,2);
        
		//左边导航点击上拉
		$(".leftmenu dl dt").click(function(){
			 if(false == $(this).siblings("dd").is(":visible")){//如果不可见点击后变蓝色
			 	$(this).css('background-position','right -30px');
			}else{
				$(this).css('background-position','right 0px');//可见点击后变红色
			}

			$(this).siblings('dd').slideToggle('fast').siblings('dt');//.end()

		});
		//点击隐藏菜单
		var i=1;
		
		//替换文字并显示隐藏左侧导航
		function replace(){
			var i=j=1;
			var x=$(".link_1");
			var y=$(".ton");
			y.click(function(){
				i++;
				if(i%2==0){
					//alert(i)
					y.text("显示菜单");
					$('#rightmain').addClass('rightmain1').removeClass('rightmain');
				}else{
					y.text("隐藏菜单");
					$('#rightmain').addClass('rightmain').removeClass('rightmain1');
				}
				
			})
			x.click(function(){
			j++;
			//alert(j);
			j%2==0 ? $(".leftmenu").css('display','none') : $(".leftmenu").css('display','block');
		})
	}
		replace();

		
		$(".leftmenu dl dd ul li a").click(function(){
			var _link = $(this).attr('_link');
			//alert(_link)
		$("#main").attr('src',_link);
		$(this).addClass('current-menuleft').parent().siblings().children().removeClass('current-menuleft');
		$(this).parents('dl').siblings().find('dd ul li a').removeClass('current-menuleft');

		});

	</script>
	
	
</body>
</html>